<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: FGPIO Peripheral driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__fgpio__driver.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">FGPIO Peripheral driver<div class="ingroups"><a class="el" href="group__gpio.html">General-Purpose Input/Output (GPIO)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for FGPIO Peripheral driver:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<center><table><tr><td><div class="center"><iframe scrolling="no" frameborder="0" src="group__fgpio__driver.svg" width="368" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</td></tr></table></center>
</div>
<p>This section describes the programming interface of the FGPIO Peripheral driver. The FGPIO driver configures the FGPIO module and provides a functional interface to build the GPIO application.</p>
<h1><a class="anchor" id="FGPIOFunGrps"></a>
Function groups</h1>
<h2><a class="anchor" id="FGPIOConfig"></a>
FGPIO Configuration</h2>
<p>This function group configures the FGPIO pin.</p>
<h2><a class="anchor" id="FGPIOOut"></a>
FGPIO Output Operations</h2>
<p>This function group sets the FGPIO pin output, such as write, set, clear, and toggle.</p>
<h2><a class="anchor" id="FGPIOinput"></a>
FGPIO Input Operations</h2>
<p>This function reads the FGPIO pin value.</p>
<h2><a class="anchor" id="FGPIOinterrupt"></a>
FGPIO Interrupt</h2>
<p>This function group checks or clears the FGPIO pin interrupt.</p>
<h1><a class="anchor" id="FGPIOTpyUC"></a>
Typical use case</h1>
<h2><a class="anchor" id="FGPIOOutOps"></a>
Output Operation</h2>
<div class="fragment"><div class="line"><span class="comment">/* Output pin configuration */</span></div><div class="line"><a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> led_config =</div><div class="line">{</div><div class="line">    kGpioDigitalOutput,</div><div class="line">    1,</div><div class="line">};</div><div class="line"><span class="comment">/*  Sets the configuration */</span></div><div class="line"><a class="code" href="group__gpio__driver.html#ga901f0041b94f3d48cad3f1bde778d1ad">FGPIO_PinInit</a>(FGPIO_LED, LED_PINNUM, &amp;led_config);</div></div><!-- fragment --><h2><a class="anchor" id="FGPIOInOps"></a>
Input Operation</h2>
<div class="fragment"><div class="line"><span class="comment">/*  Input pin configuration */</span></div><div class="line"><a class="code" href="group__port__driver.html#ga13366bbc894a0d4d32af0b24df7047a5">PORT_SetPinInterruptConfig</a>(BOARD_SW2_PORT, BOARD_SW2_FGPIO_PIN, <a class="code" href="group__port__driver.html#gga18b2add7e164a5dfa5c00832f857a1f6afe8f52eaca9af2ce2087a2991f50c463">kPORT_InterruptFallingEdge</a>);</div><div class="line">NVIC_EnableIRQ(BOARD_SW2_IRQ);    </div><div class="line"><a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> sw1_config =</div><div class="line">{</div><div class="line">    kGpioDigitalInput,</div><div class="line">    0,</div><div class="line">};</div><div class="line"><span class="comment">/* Sets the input pin configuration */</span></div><div class="line"><a class="code" href="group__gpio__driver.html#ga901f0041b94f3d48cad3f1bde778d1ad">FGPIO_PinInit</a>(FGPIO_SW1, SW1_PINNUM, &amp;sw1_config);</div></div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
